<script>
import yun_ling from '@/components/dao_ze_yun_ling.vue'
import huan_shen from '@/components/dao_ze_huan_shen.vue'
export default {
  setup() {
    let componentName = "yun_ling"
    return {
      componentName
    }
  },
  props: {
    dungeon_num: "String"
  },
  components: {
    "yun_ling": yun_ling,
    "huan_shen": huan_shen
  },
  created() {
    this.initComponent()
  },
  methods: {
    initComponent() {
      switch (this.dungeon_num) {
        case "1":
          this.componentName = "yun_ling";
          break
        case "2":
          this.componentName = "huan_shen";
          break
      }
    }
  }
}


</script>

<template>
  <!-- 动态组件 -->
  <component :is="componentName"></component>
</template>

<style scoped>

</style>
